package icu.d4peng.basic.captcha.properties;

import icu.d4peng.basic.captcha.enums.CaptchaEnum;
import com.wf.captcha.base.Captcha;

import icu.d4peng.basic.core.constant.ProjectConstant;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * CaptchaProperties:验证码属性
 *
 * @author d4peng <a href="d4peng@qq.com">d4peng@qq.com</a>
 * @since 2023.12.02
 */
@Data
@ConfigurationProperties(prefix = CaptchaProperties.PREFIX)
public class CaptchaProperties {

	public static final String PREFIX = ProjectConstant.PREFIX + ".captcha";

	/**
	 * 是否开启:默认开启
	 */
	private boolean enabled = true;

	/**
	 * 验证码类型:默认PNG
	 */
	private CaptchaEnum type = CaptchaEnum.SPEC;

	/**
	 * 字体类型:默认1
	 */
	private int fontType = Captcha.FONT_1;

	/**
	 * 文本类型:默认类型
	 */
	private int textType = Captcha.TYPE_DEFAULT;

	/**
	 * 验证码文本长度:默认4位
	 */
	private int textLength = 4;

	/**
	 * 宽度:默认130
	 */
	private int width = 130;

	/**
	 * 高度:默认48
	 */
	private int height = 48;

}
